/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.triumphsys.icici.cmeeting.portlet.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;

import java.io.Serializable;

import java.lang.reflect.Proxy;

import java.util.Date;

/**
 * @author Triumphsys
 */
public class CMSanctionProposalClp extends BaseModelImpl<CMSanctionProposal>
	implements CMSanctionProposal {
	public CMSanctionProposalClp() {
	}

	public long getPrimaryKey() {
		return _sanctionProposalId;
	}

	public void setPrimaryKey(long pk) {
		setSanctionProposalId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return new Long(_sanctionProposalId);
	}

	public long getSanctionProposalId() {
		return _sanctionProposalId;
	}

	public void setSanctionProposalId(long sanctionProposalId) {
		_sanctionProposalId = sanctionProposalId;
	}

	public Date getCodCcmDt() {
		return _codCcmDt;
	}

	public void setCodCcmDt(Date codCcmDt) {
		_codCcmDt = codCcmDt;
	}

	public long getBranchId() {
		return _branchId;
	}

	public void setBranchId(long branchId) {
		_branchId = branchId;
	}

	public String getApprovalTl() {
		return _approvalTl;
	}

	public void setApprovalTl(String approvalTl) {
		_approvalTl = approvalTl;
	}

	public String getApprovalRmg() {
		return _approvalRmg;
	}

	public void setApprovalRmg(String approvalRmg) {
		_approvalRmg = approvalRmg;
	}

	public long getIndustryId() {
		return _industryId;
	}

	public void setIndustryId(long industryId) {
		_industryId = industryId;
	}

	public long getCoePTypeId() {
		return _coePTypeId;
	}

	public void setCoePTypeId(long coePTypeId) {
		_coePTypeId = coePTypeId;
	}

	public String getProposal() {
		return _proposal;
	}

	public void setProposal(String proposal) {
		_proposal = proposal;
	}

	public long getLoanAmt() {
		return _loanAmt;
	}

	public void setLoanAmt(long loanAmt) {
		_loanAmt = loanAmt;
	}

	public long getRatingRmgId() {
		return _ratingRmgId;
	}

	public void setRatingRmgId(long ratingRmgId) {
		_ratingRmgId = ratingRmgId;
	}

	public long getTenure() {
		return _tenure;
	}

	public void setTenure(long tenure) {
		_tenure = tenure;
	}

	public long getCompExp() {
		return _compExp;
	}

	public void setCompExp(long compExp) {
		_compExp = compExp;
	}

	public long getComExpP() {
		return _comExpP;
	}

	public void setComExpP(long comExpP) {
		_comExpP = comExpP;
	}

	public long getGroupExp() {
		return _groupExp;
	}

	public void setGroupExp(long groupExp) {
		_groupExp = groupExp;
	}

	public long getGroupExpP() {
		return _groupExpP;
	}

	public void setGroupExpP(long groupExpP) {
		_groupExpP = groupExpP;
	}

	public long getSmId1() {
		return _smId1;
	}

	public void setSmId1(long smId1) {
		_smId1 = smId1;
	}

	public long getSmId2() {
		return _smId2;
	}

	public void setSmId2(long smId2) {
		_smId2 = smId2;
	}

	public long getSmId3() {
		return _smId3;
	}

	public void setSmId3(long smId3) {
		_smId3 = smId3;
	}

	public long getTlId1() {
		return _tlId1;
	}

	public void setTlId1(long tlId1) {
		_tlId1 = tlId1;
	}

	public long getTlId2() {
		return _tlId2;
	}

	public void setTlId2(long tlId2) {
		_tlId2 = tlId2;
	}

	public String getIpNetM() {
		return _ipNetM;
	}

	public void setIpNetM(String ipNetM) {
		_ipNetM = ipNetM;
	}

	public long getReportingAId1() {
		return _reportingAId1;
	}

	public void setReportingAId1(long reportingAId1) {
		_reportingAId1 = reportingAId1;
	}

	public long getReportingAId2() {
		return _reportingAId2;
	}

	public void setReportingAId2(long reportingAId2) {
		_reportingAId2 = reportingAId2;
	}

	public long getProgramId() {
		return _programId;
	}

	public void setProgramId(long programId) {
		_programId = programId;
	}

	public Date getProgramExpiryDate() {
		return _programExpiryDate;
	}

	public void setProgramExpiryDate(Date programExpiryDate) {
		_programExpiryDate = programExpiryDate;
	}

	public long getProposalId() {
		return _proposalId;
	}

	public void setProposalId(long proposalId) {
		_proposalId = proposalId;
	}

	public CMSanctionProposal toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (CMSanctionProposal)Proxy.newProxyInstance(CMSanctionProposal.class.getClassLoader(),
				new Class[] { CMSanctionProposal.class },
				new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		CMSanctionProposalClp clone = new CMSanctionProposalClp();

		clone.setSanctionProposalId(getSanctionProposalId());
		clone.setCodCcmDt(getCodCcmDt());
		clone.setBranchId(getBranchId());
		clone.setApprovalTl(getApprovalTl());
		clone.setApprovalRmg(getApprovalRmg());
		clone.setIndustryId(getIndustryId());
		clone.setCoePTypeId(getCoePTypeId());
		clone.setProposal(getProposal());
		clone.setLoanAmt(getLoanAmt());
		clone.setRatingRmgId(getRatingRmgId());
		clone.setTenure(getTenure());
		clone.setCompExp(getCompExp());
		clone.setComExpP(getComExpP());
		clone.setGroupExp(getGroupExp());
		clone.setGroupExpP(getGroupExpP());
		clone.setSmId1(getSmId1());
		clone.setSmId2(getSmId2());
		clone.setSmId3(getSmId3());
		clone.setTlId1(getTlId1());
		clone.setTlId2(getTlId2());
		clone.setIpNetM(getIpNetM());
		clone.setReportingAId1(getReportingAId1());
		clone.setReportingAId2(getReportingAId2());
		clone.setProgramId(getProgramId());
		clone.setProgramExpiryDate(getProgramExpiryDate());
		clone.setProposalId(getProposalId());

		return clone;
	}

	public int compareTo(CMSanctionProposal cmSanctionProposal) {
		int value = 0;

		if (getSanctionProposalId() < cmSanctionProposal.getSanctionProposalId()) {
			value = -1;
		}
		else if (getSanctionProposalId() > cmSanctionProposal.getSanctionProposalId()) {
			value = 1;
		}
		else {
			value = 0;
		}

		if (value != 0) {
			return value;
		}

		return 0;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		CMSanctionProposalClp cmSanctionProposal = null;

		try {
			cmSanctionProposal = (CMSanctionProposalClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		long pk = cmSanctionProposal.getPrimaryKey();

		if (getPrimaryKey() == pk) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return (int)getPrimaryKey();
	}

	public String toString() {
		StringBundler sb = new StringBundler(53);

		sb.append("{sanctionProposalId=");
		sb.append(getSanctionProposalId());
		sb.append(", codCcmDt=");
		sb.append(getCodCcmDt());
		sb.append(", branchId=");
		sb.append(getBranchId());
		sb.append(", approvalTl=");
		sb.append(getApprovalTl());
		sb.append(", approvalRmg=");
		sb.append(getApprovalRmg());
		sb.append(", industryId=");
		sb.append(getIndustryId());
		sb.append(", coePTypeId=");
		sb.append(getCoePTypeId());
		sb.append(", proposal=");
		sb.append(getProposal());
		sb.append(", loanAmt=");
		sb.append(getLoanAmt());
		sb.append(", ratingRmgId=");
		sb.append(getRatingRmgId());
		sb.append(", tenure=");
		sb.append(getTenure());
		sb.append(", compExp=");
		sb.append(getCompExp());
		sb.append(", comExpP=");
		sb.append(getComExpP());
		sb.append(", groupExp=");
		sb.append(getGroupExp());
		sb.append(", groupExpP=");
		sb.append(getGroupExpP());
		sb.append(", smId1=");
		sb.append(getSmId1());
		sb.append(", smId2=");
		sb.append(getSmId2());
		sb.append(", smId3=");
		sb.append(getSmId3());
		sb.append(", tlId1=");
		sb.append(getTlId1());
		sb.append(", tlId2=");
		sb.append(getTlId2());
		sb.append(", ipNetM=");
		sb.append(getIpNetM());
		sb.append(", reportingAId1=");
		sb.append(getReportingAId1());
		sb.append(", reportingAId2=");
		sb.append(getReportingAId2());
		sb.append(", programId=");
		sb.append(getProgramId());
		sb.append(", programExpiryDate=");
		sb.append(getProgramExpiryDate());
		sb.append(", proposalId=");
		sb.append(getProposalId());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(82);

		sb.append("<model><model-name>");
		sb.append(
			"com.triumphsys.icici.cmeeting.portlet.model.CMSanctionProposal");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>sanctionProposalId</column-name><column-value><![CDATA[");
		sb.append(getSanctionProposalId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>codCcmDt</column-name><column-value><![CDATA[");
		sb.append(getCodCcmDt());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>branchId</column-name><column-value><![CDATA[");
		sb.append(getBranchId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>approvalTl</column-name><column-value><![CDATA[");
		sb.append(getApprovalTl());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>approvalRmg</column-name><column-value><![CDATA[");
		sb.append(getApprovalRmg());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>industryId</column-name><column-value><![CDATA[");
		sb.append(getIndustryId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>coePTypeId</column-name><column-value><![CDATA[");
		sb.append(getCoePTypeId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>proposal</column-name><column-value><![CDATA[");
		sb.append(getProposal());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>loanAmt</column-name><column-value><![CDATA[");
		sb.append(getLoanAmt());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>ratingRmgId</column-name><column-value><![CDATA[");
		sb.append(getRatingRmgId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>tenure</column-name><column-value><![CDATA[");
		sb.append(getTenure());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>compExp</column-name><column-value><![CDATA[");
		sb.append(getCompExp());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>comExpP</column-name><column-value><![CDATA[");
		sb.append(getComExpP());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>groupExp</column-name><column-value><![CDATA[");
		sb.append(getGroupExp());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>groupExpP</column-name><column-value><![CDATA[");
		sb.append(getGroupExpP());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>smId1</column-name><column-value><![CDATA[");
		sb.append(getSmId1());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>smId2</column-name><column-value><![CDATA[");
		sb.append(getSmId2());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>smId3</column-name><column-value><![CDATA[");
		sb.append(getSmId3());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>tlId1</column-name><column-value><![CDATA[");
		sb.append(getTlId1());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>tlId2</column-name><column-value><![CDATA[");
		sb.append(getTlId2());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>ipNetM</column-name><column-value><![CDATA[");
		sb.append(getIpNetM());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>reportingAId1</column-name><column-value><![CDATA[");
		sb.append(getReportingAId1());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>reportingAId2</column-name><column-value><![CDATA[");
		sb.append(getReportingAId2());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>programId</column-name><column-value><![CDATA[");
		sb.append(getProgramId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>programExpiryDate</column-name><column-value><![CDATA[");
		sb.append(getProgramExpiryDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>proposalId</column-name><column-value><![CDATA[");
		sb.append(getProposalId());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private long _sanctionProposalId;
	private Date _codCcmDt;
	private long _branchId;
	private String _approvalTl;
	private String _approvalRmg;
	private long _industryId;
	private long _coePTypeId;
	private String _proposal;
	private long _loanAmt;
	private long _ratingRmgId;
	private long _tenure;
	private long _compExp;
	private long _comExpP;
	private long _groupExp;
	private long _groupExpP;
	private long _smId1;
	private long _smId2;
	private long _smId3;
	private long _tlId1;
	private long _tlId2;
	private String _ipNetM;
	private long _reportingAId1;
	private long _reportingAId2;
	private long _programId;
	private Date _programExpiryDate;
	private long _proposalId;
}